package cn.sc.summer.exception.asserts;

import cn.sc.summer.exception.base.AssertX;
import cn.sc.summer.exception.base.ExceptionResult;
import cn.sc.summer.constant.util.FormatUtil;
import cn.sc.summer.exception.exceptions.AuthException;

/**
 * 类名：定义异常断言接口信息
 *
 * @author a-xin
 * @date 2024/1/19 14:02
 */
public interface AuthExceptionAssert extends ExceptionResult, AssertX {
    @Override
    default AuthException newException() {
        return new AuthException(this.getMessage());
    }

    @Override
    default AuthException newException(String pattern, Object... message) {
        return new AuthException(FormatUtil.formatLogStr(pattern, message), this.getCode());
    }
}

